{% extends 'layout.html' %}

{% block content %}
    <div class="container">
        <form class="form-horizontal" method="post">
            {% csrf_token %}
            {% for field in form %}
            <div class="form-group">
                <label for="{{ field.id_for_label }}" class="col-sm-2 control-label">{{field.label}}</label>
                <div class="col-sm-10">
                    {{ field }}
                    <span style="color: red">{{ field.errors.0 }}</span>
                </div>
            </div>
            {% endfor %}

            <div class="form-group">
                <div class="col-sm-offset-2 col-sm-10">
                    <input type="submit" value="保 存" class="btn btn-primary">
                    <span style="color: red">{{ form.non_field_errors.0 }}</span>
                </div>
            </div>
        </form>
    </div>
{% endblock %}


